package com.china08.yxyapi.entity.mg.homework;

import java.util.Date;
import java.util.List;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.china08.yxyapi.entity.mg.MongoBaseEntityNoId;

/**
 * 作业:任务:试题,每个作业的每一道题生成一条数据。
 * 
 * @author Richard Wang
 *
 */
@Document(collection = "yxy.tea.homework.task.ques")
public class HomeworkTaskQues extends MongoBaseEntityNoId {

	private static final long serialVersionUID = 2553462239722085812L;

	/** 主键 */
	@Id
	private String id;

	/** 任务:ID */
	@Indexed
	@Field(value = "task_id")
	private String taskId;

	/** 标题 */
	@Field(value = "title")
	private String title;

	/**
	 * 试题类标题
	 */
	@Field(value = "sub_title")
	private String subTitle;

	/**
	 * 本任务截止完成时间，此时间之后就不能答题
	 */
	@Field(value = "predict_date")
	private Date predictDate;

	/** 试题:ID， 如果是通知类作业：tz+随机数 */
	@Indexed
	@Field(value = "ques_id")
	private String quesId;

	/** 老师:ID */
	@Indexed
	@Field(value = "teacher_id")
	private String teacherId;

	/**
	 * 试题类型，使用题库中的的类型 （0--单选择题，1--多选择题，2--通知类, 3--填空 4--简答,5--阅读）</br>
	 * 2017.08.23 王慧超,增加 5类型:阅读类题型
	 */
	@Field(value = "ques_type")
	private String quesType;

	/**
	 * 通知类作业 老师布置作业编辑的内容
	 */
	@Field(value = "ques_content")
	private String quesContent;

	/**
	 * 通知类作业，上传的图片Url,</br>
	 * 2017.08.23 此字段不要再使用,全部使用 quesArticle字段
	 * 
	 */
	@Deprecated
	@Field(value = "ques_image")
	private List<String> quesImage;

	/**
	 * 通知类作业，上传的文档,需要存储文档地址，文档的名称</br>
	 * 2017.08.23 王慧超</br>
	 * 通知类,阅读类的附件都使用此字段存储,对象中增加一个阅读时长的描述
	 */
	@Field(value = "ques_article")
	private List<Article> quesArticle;

	/** 学段 */
	@Field(value = "stage")
	private String stage;

	/** 学科 */
	@Field(value = "subject")
	private String subject;

	/** 知识点:ID */
	@Field(value = "know_id")
	private List<Integer> knowId;

	/** 知识点:Name */
	@Field(value = "know_name")
	private List<String> knowName;

	/** 难度系数 */
	@Field(value = "difficulty_xs")
	private Float difficultyXs = 1.0f;

	/** 难度级别:1-易,2-中,3-难 */
	@Field(value = "difficulty_level")
	private Integer difficultyLevel = 1;

	/** 任务中题的序号 */
	@Field(value = "order")
	private Integer order;

	/**
	 * 试题类型 0：试题类作业，1：通知类作业 2：阅读类作业。
	 */
	@Field(value = "task_type")
	private String taskType;

	/**
	 * 作业发布的来源 00--作业系统 01--备授课系统
	 */
	@Field(value = "source")
	private Integer source;

	/**
	 * 备授课类型: 0--预习作业 1--课后作业</br>
	 * 2017.08.25 王慧超 </br>
	 * 作业加预习作业和课后作业字段 </br>
	 * 预习作业：备授课发送的标记为预习作业的作业 </br>
	 * 课后作业：作业系统布置的以及备授课发送的标记为课后作业的作业
	 * 
	 */
	@Field(value = "lecture_type")
	private Integer lectureType;

	/**
	 * 备授课的id
	 */
	@Field(value = "lecture_id")
	private String lectureId;

	/**
	 * 通知类作业是否需要学生在线提交true需要,false不需要
	 */
	@Field(value = "if_need_sumbit")
	private Boolean ifNeedSumbit;

	public Boolean getIfNeedSumbit() {
		return ifNeedSumbit;
	}

	public void setIfNeedSumbit(Boolean ifNeedSumbit) {
		this.ifNeedSumbit = ifNeedSumbit;
	}

	public String getTeacherId() {
		return teacherId;
	}

	public void setTeacherId(String teacherId) {
		this.teacherId = teacherId;
	}

	public String getStage() {
		return stage;
	}

	public void setStage(String stage) {
		this.stage = stage;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getQuesId() {
		return quesId;
	}

	public void setQuesId(String quesId) {
		this.quesId = quesId;
	}

	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Integer getDifficultyLevel() {
		return difficultyLevel;
	}

	public void setDifficultyLevel(Integer difficultyLevel) {
		this.difficultyLevel = difficultyLevel;
	}

	public List<Integer> getKnowId() {
		return knowId;
	}

	public void setKnowId(List<Integer> knowId) {
		this.knowId = knowId;
	}

	public List<String> getKnowName() {
		return knowName;
	}

	public void setKnowName(List<String> knowName) {
		this.knowName = knowName;
	}

	public String getQuesType() {
		return quesType;
	}

	public void setQuesType(String quesType) {
		this.quesType = quesType;
	}

	public Integer getOrder() {
		return order;
	}

	public void setOrder(Integer order) {
		this.order = order;
	}

	/**
	 * @author
	 *
	 */
	public static class Article {
		private String url;
		private String article_name;

		private Integer duration;//

		public Integer getDuration() {
			return duration;
		}

		public void setDuration(Integer duration) {
			this.duration = duration;
		}

		public String getUrl() {
			return url;
		}

		public void setUrl(String url) {
			this.url = url;
		}

		public String getArticle_name() {
			return article_name;
		}

		public void setArticle_name(String article_name) {
			this.article_name = article_name;
		}

	}

	public List<String> getQuesImage() {
		return quesImage;
	}

	public void setQuesImage(List<String> quesImage) {
		this.quesImage = quesImage;
	}

	public List<Article> getQuesArticle() {
		return quesArticle;
	}

	public void setQuesArticle(List<Article> quesArticle) {
		this.quesArticle = quesArticle;
	}

	public String getTaskType() {
		return taskType;
	}

	public void setTaskType(String taskType) {
		this.taskType = taskType;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getSubTitle() {
		return subTitle;
	}

	public void setSubTitle(String subTitle) {
		this.subTitle = subTitle;
	}

	public Date getPredictDate() {
		return predictDate;
	}

	public void setPredictDate(Date predictDate) {
		this.predictDate = predictDate;
	}

	public String getQuesContent() {
		return quesContent;
	}

	public void setQuesContent(String quesContent) {
		this.quesContent = quesContent;
	}

	public Float getDifficultyXs() {
		return difficultyXs;
	}

	public void setDifficultyXs(Float difficultyXs) {
		this.difficultyXs = difficultyXs;
	}

	public Integer getSource() {
		return source;
	}

	public void setSource(Integer source) {
		this.source = source;
	}

	public String getLectureId() {
		return lectureId;
	}

	public void setLectureId(String lectureId) {
		this.lectureId = lectureId;
	}

	public Integer getLectureType() {
		return lectureType;
	}

	public void setLectureType(Integer lectureType) {
		this.lectureType = lectureType;
	}

}
